package designPattern.struction.decoratorpattern.hamburger;

/**
 * @author 张琪
 * @date 2023/2/6 11:37
 */
public class Test {
    public static void main(String[] args) {
        Hamburger hamburger = new ChickenBurger();
        System.out.println(hamburger.getName() + " price" + hamburger.getPrice());

        Lettuce lettuce = new Lettuce(hamburger);
        System.out.println(lettuce.getName() + " price" + lettuce.getPrice());

        Chilli chilli = new Chilli(hamburger);
        System.out.println(chilli.getName() + " price" + chilli.getPrice());

        Chilli chilli1 = new Chilli(new Lettuce(hamburger));
        System.out.println(chilli1.getName() + " price" + chilli1.getPrice());

    }
}
